

<!-- start box -->

<div class="boxmain">

  <div class="content">
  <p class="header"><img src="public/images/nag/<?php echo $this->translate('com_index_img_opinion');?>" alt=""></p>
  
		<?php 
		if(!empty($this->koment))
		{
			$ile = count($this->koment)-1;
			foreach($this->koment as $klucz=>$rekord)
			{?>
			<div class="boxreview">
		    	<div class="name"> <span class="bold"><?php echo $rekord['author'];?></span>, <span class="date">data dodania: <?php echo $rekord['date'];?></span></div>
		   		<div class="rating">
		   			<?php echo $this->translate( 'com_index_opinion' ); ?>
		   			<span class="stars">
		   			<?php for($i=0;$rekord['rating']>$i;$i++){?>
		   				<img src="public/images/star1.png" alt="">
		   			<?php }?>
		   			<?php for($i=0;(6-$rekord['rating'])>$i;$i++){?>
		   				<img src="public/images/star2.png" alt="">
		   			<?php }?>
		   			</span>
		   		</div>
		    	<div class="text">
		    	<?php 
		    	$i = 0;
		    	$flaga = false;
		    	do
		    	{
		    		$litera = substr($rekord['content'], $i, 1);
		    		if(preg_match('/^([a-zA-Z]){1}$/', $litera))
		    		{
		    			$flaga = true;
		    		}
		    		$i++;
		    	}
		    	while($flaga != true);
		    	?>
		       		<img src="public/images/fletter/<?php echo strtolower($litera);?>.jpg" alt="" class="fletter"><br><?php echo substr($rekord['content'], $i);?>
		    	</div>
			</div>
			<?php 
				if($ile != $klucz)
				{?>
				<img src="public/images/liner.png" alt="" class="liner">	
				<?php 
				}
			}
		}
		else
		{
			echo $this->translate( 'com_index_no_comments' ); 
		}?>


  </div>
	
	
</div>
<div class="boxmainend"></div>

<!-- koniec box -->
